package cn.ikun.mf;

import java.lang.reflect.Field;
import java.lang.reflect.Method;

public class Appref {
    public static void main(String[]args)throws Exception{
        Class<?> H = Class.forName("cn.ikun.mf.Human");
        Object o = H.newInstance();

        Field name = H.getDeclaredField("name");
        name.setAccessible(true);
        name.set(o,"Timor");
        Method getname = H.getMethod("getName");
        Object result = getname.invoke(o);
        System.out.println(result);
    }

}
